Guesses the month the user might have meant using levenshtein()

====================================================

function guessMonth($actualInput){
    $input = strtolower($actualInput);
    $months = array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
    $smallest = 1000;
    $closest = $months[0];
    foreach($months as $month){
        //Adding costs 1 point, changing costs 5 points and subtracting costs 3 points.
        $try = levenshtein($input, strtolower($month), 1, 5, 3); //This way abbreviations like "Feb" will go to february, but "fevuary" will also go to February...
        if($try < $smallest){
            $smallest = $try;
            $closest = $month;
        }
    }
    return $closest;
}

//"abri" returns "April", for example.